using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UpgradeCubeGun:Upgrade {

	float timeLastActivation;

	protected override void ReloadStartEventHandler(object _sender,ReloadStartEventArgs e) {
		base.ReloadStartEventHandler(_sender,e);
		
		if(Time.time-timeLastActivation<0.15f) return;
		if(weaponWeapon.currentClip.content.Count<=weaponWeapon.currentClip.clipSize*0.5f) return;
		
		
		e.stat.overrideNotToLoad=true;

		timeLastActivation=Time.time;
		if(weapon.owner.energy>e.stat.energyPerAmmo) {
			weapon.owner.energy-=e.stat.energyPerAmmo;
			weaponWeapon.currentClip.AddRound(AmmoData.cube,true);
		}

	}



}
